<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
    <meta name="format-detection" content="telephone=no, email=no" />
    <link href="css/base.css" type="text/css" rel="stylesheet">
    <link href="css/common.css" type="text/css" rel="stylesheet">
    <script src="js/jquery.js"></script>
    <script src="js/common.js"></script>
    <script>
        $(function () {
            $(".cat-child").each(function(){
                $(this).attr("data-go",htmlObj.category+"-"+($(".cat-child").index($(this))+1));
            });
            getScriptData("index?callback=showIndexData");
        });
        function showIndexData(data){
            if(scriptFlag){
                data = data.data;
                loadingEnd();
            }
            var focusArray = data.focus;
            var focusObj;
            for(var i = 0,j = focusArray.length; i< j;i++){
                if(focusArray[i].pic&&focusArray[i].name){
                    focusObj = focusArray[i];
                    break;
                }
            }
            $(".logo img").attr("src",focusObj.pic);
            $(".logo p").html(focusObj.name);
            var activityArray = data.rcmAcivities;
            var activityHtml = '';
            for(var m = 0,n = activityArray.length; m < n; m++){
                var activityObj = activityArray[m];
                if(!activityObj.actName || !activityObj.busiName){
                    continue;
                }
                activityHtml += '<div class="activity-list" data-go="'+htmlObj.activity+'-'+activityObj.id+'">';
                activityHtml += '<img src="'+activityObj.pic+'" />';
                activityHtml += '<div class="name">';
                activityHtml += '<p>'+activityObj.busiName+'</p>';
                activityHtml += '<span>'+activityObj.actName+'</span>';
                activityHtml += '</div>';
                activityHtml += '</div>';
            }
            $(".activity").html(activityHtml);
        }
    </script>
</head>
<body>
    <div class="logo">
        <img src="" />
        <div class="shade"></div>
        <p></p>
    </div>
    <div class="cat">
        <div class="cat-left">
            <div class="cat-child cat-child-big">
                <img src="img/cat_food.jpg" />
                <p class="food">美食</p>
            </div>
            <div class="cat-child">
                <img src="img/cat_entertainment.jpg" />
                <p class="entertainment">娱乐</p>
            </div>
        </div>
        <div class="cat-right">
            <div class="cat-child">
                <img src="img/cat_shopping.jpg" />
                <p class="shopping">购物</p>
            </div>
            <div class="cat-child">
                <img src="img/cat_tour.jpg" />
                <p class="tour">旅游</p>
            </div>
            <div class="cat-child">
                <img src="img/cat_hotel.jpg" />
                <p class="hotel">酒店</p>
            </div>
        </div>
    </div>
    <div class="title">精彩活动</div>
    <div class="activity">
    </div>
</body>
</html>